{extend name='common:base'}
{block name="content"}
<form class="form-horizontal" id="form" method="post" action="" enctype="multipart/form-data">
    <div class="form-group">
        <label for="select1" class="col-sm-2 control-label">父规则</label>
        <div class="col-sm-10">
            <select class="form-control" id="select1" name="pid">
                <option value="0">顶级规则</option>
                {foreach $parent as $vo}
                <option value="{$vo['id']}">{$vo['_title']}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-2 control-label">规则名称</label>
        <div class="col-sm-10">
            <input type="text" name="title" class="form-control" data-rule-required="true" data-msg-required="必须输入" id="inputEmail3" placeholder="请输入规则名称">
        </div>
    </div>

    <div class="form-group">
        <label for="input2" class="col-sm-2 control-label">规则</label>
        <div class="col-sm-10">
            <input type="text" name="name" class="form-control" id="input2" placeholder="请输入规则">
        </div>
    </div>
    <div class="form-group">
        <label for="confPassword" class="col-sm-2 control-label">状态</label>
        <div class="col-sm-10">
            <label class="radio-inline">
                <input type="radio" name="status"  value="1" checked> 启用
            </label>
            <label class="radio-inline">
                <input type="radio" name="status"  value="0"> 禁用
            </label>
        </div>
    </div>
    <div class="form-group">
        <label for="confPassword" class="col-sm-2 control-label">是否菜单显示</label>
        <div class="col-sm-10">
            <label class="radio-inline">
                <input type="radio" name="ismenu"  value="1" > 是
            </label>
            <label class="radio-inline">
                <input type="radio" name="ismenu"  value="0" checked> 否
            </label>
        </div>
    </div>
    <input type="hidden" name="__token__" value="{$Request.token}">
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default">提交</button>
            <button type="reset" class="btn btn-default">取消</button>
        </div>
    </div>
</form>
{/block}

{block name="extend_js"}
<script src="/bower/jquery-validation/dist/jquery.validate.js"></script>
<script src="/bower/jquery-validation/src/localization/messages_zh.js"></script>
<script>
    $().ready(function(){
        $("#form").validate();
    });
</script>
{/block}